﻿using System;
using System.Text;
using RAP.Framework.Libary.Utils;
using RAP.Framework.Libary.DomTemplateBuilder.Element;
using RAP.Framework.Libary.DomTemplateBuilder.Configuration;
using RAP.Framework.Libary.DomTemplateBuilder.Interface;
using System.Threading;


namespace RAP.Framework.Libary.DomTemplateBuilder.Handler
{
  /// <summary>
  /// 线程休眠的Handler
  /// </summary>
  public class SleepHandler : HandlerBase
  {
    public override void DoRender(StringBuilder writer, object rootParamObject, object parentParamObject, ITemplateRenderContext context)
    {
      var ele = Element as Sleep;
      var timeout = ele.Timeout;
      Thread.Sleep(timeout);

    }
  }
}
